// CEC14.h

#pragma once

#include "windows.h"
#include <stdio.h>
#include <math.h>
#include <malloc.h>

void cec14_test_func(double *, double *,int,int,int);

double *OShift,*M,*y,*z,*x_bound;
int ini_flag=0,n_flag,func_flag,*SS;

using namespace System;

namespace CEC14 {

	public ref class CEC14Functions
	{
		public:
		
		double funcEval(array<double> ^values, int dimension, int funcNum)
		{
			//input vector
			double *x;
			x=(double *)malloc(dimension*sizeof(double));

			int i;

			for (i = 0 ; i < dimension ; i++) {
				x[i] = values[i];
			}

			double *f;
			f=(double *)malloc(sizeof(double));

			cec14_test_func(x, f, dimension,1,funcNum);

			return *f;
		}
	};
}
